﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using FBroSharp;
using FBroSharp.DataType;

namespace 单窗口显示方案
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            CreateBrowser();
        }
        public void CreateBrowser()
        { 
            string url = "https://www.baidu.com";
            FBroSharpWindowsInfo windowsInfo = new FBroSharpWindowsInfo { 
                parent_window = this.Handle,
                x=0,
                y=0,
                width=this.Width,
                height=this.Height
            };
            BrowserEvent browser_event = new BrowserEvent();

            FBroSharpControl.CreatBrowser(url, windowsInfo, default, default, default, browser_event, default);

        }
    }
}
